package com.ygqh.baby.service;

import java.util.Date;
import java.util.List;

import com.ygqh.baby.ao.QueryInfo;
import com.ygqh.baby.ao.ResultSet;
import com.ygqh.baby.model.YgHotProductModel;
import com.ygqh.baby.po.BiSkuSale;

public interface BiSkuSaleService {

	List<BiSkuSale> find();

	int findCount();

	BiSkuSale findById(Long id);

	int deleteSoft(Long[] ids);

	int deleteSoft(Long id);

	int save(BiSkuSale biSkuSale);

	int update(BiSkuSale biSkuSale);

	int saveOrUpdate(BiSkuSale biSkuSale);

	ResultSet<BiSkuSale> search(QueryInfo queryInfo, String q);

	/**
	 * 统计商品销量
	 * 
	 * @Title: statisticalSkuSaleCount
	 * @param startDate
	 * @param endDate
	 * @param shopNo
	 * @param productCode
	 *            入参
	 * @return List<BiSkuSale> 返回类型
	 * @author （guohao）
	 * @throws
	 * @date 2017年10月16日 上午11:24:05
	 * @version V1.0
	 */

	int countBiProductSaleList(Date startDate, Date endDate, String shopNo, String shopName, String productCode,
			String productName, Date salesStartDate, Date salesEndDate);

	ResultSet<BiSkuSale> searchBiProductSaleList(QueryInfo queryInfo, Date startDate, Date endDate, String shopNo,
			String shopName, String productCode, String productName, Date salesStartDate, Date salesEndDate);

	int addBatch(List<BiSkuSale> list);

	List<BiSkuSale> searchBiProductByShop(Date startDate, Date endDate, String shopNo, String productCode);

	List<BiSkuSale> searchBiProductBySku(Date startDate, Date endDate, String shopNo, String... productCodes);

	List<BiSkuSale> statisticalSkuSaleCount(QueryInfo queryInfo, Date startDate, Date endDate, String shopNo,
			String productCode);

	/**
	 * 统计，M站的商品销量
	 * 
	 * @Title: statisticalSkuSaleCountOnlyM
	 * @param queryInfo
	 * @param startDate
	 * @param endDate
	 * @param productCode
	 *            入参
	 * @return List<BiSkuSale> 返回类型
	 * @author （guohao）
	 * @throws
	 * @date 2017年10月19日 下午3:32:58
	 * @version V1.0
	 */
	List<BiSkuSale> statisticalSkuSaleCountOnlyM(QueryInfo queryInfo, Date startDate, Date endDate, String productCode);

	List<BiSkuSale> findSkuSaleList(Date startDate, String shopName);

	int updateAmountBatch(List<BiSkuSale> exitList);

	int additionAmountBatch(List<BiSkuSale> list);

	Boolean existed(String shopNo, String skuCode, Date biDate);

    ResultSet<YgHotProductModel> searchHotProduct(QueryInfo queryInfo, Date startDate, Date endDate,String shopNo, String shopName, String productName);
}
